package com.yss.sofa.report.engine.series;

import java.util.ArrayList;
import java.util.List;

import com.yss.sofa.report.engine.Const;

public class MultiPieSeries extends DataSetSeries{
	private static final long serialVersionUID = 8862626849698937183L;
	private String category;
	private String item;
	private String value;
	private boolean ignoreEmptyCategory;
	private boolean ignoreEmptyItem;
	private boolean ignoreEmptyValue;
	private boolean outline;
	private boolean antialias;
	private boolean circular;
	private String explode;
	private boolean legend;
	private int legendPosition;//0=bottom,1=right;2=top,3=left;
	private String label;
	private List<String> colors=new ArrayList<String>();
	private boolean ring;
	private double depth;
	private int colCount;
	protected MultiPieSeries(int type) {
		super(type);
		this.category=Const.NONE;
		this.item=Const.NONE;
		this.value=Const.NONE;
		this.ignoreEmptyCategory=false;
		this.ignoreEmptyItem=false;
		this.ignoreEmptyValue=false;
		this.outline=false;
		this.antialias=true;
		this.circular=true;
		this.explode=null;
		this.legend=true;
		this.label=null;
		this.legendPosition=0;
		this.ring=false;
		this.depth=0.3d;
		this.colCount=0;
	}
	public MultiPieSeries(){
		this(TYPE_MULTI_PIE);
	}
	@Override
	public void assignTo(Series series){
		MultiPieSeries _=(MultiPieSeries)series;
		super.assignTo(_);
		_.category=this.category;
		_.item=this.item;
		_.value=this.value;
		_.ignoreEmptyCategory=this.ignoreEmptyCategory;
		_.ignoreEmptyItem=this.ignoreEmptyItem;
		_.ignoreEmptyValue=this.ignoreEmptyValue;
		_.outline=this.outline;
		_.antialias=this.antialias;
		_.circular=this.circular;
		_.explode=this.explode;
		_.legend=this.legend;
		_.label=this.label;
		_.legendPosition=this.legendPosition;
		_.ring=this.ring;
		_.depth=this.depth;
		_.colCount=this.colCount;
		_.colors.clear();
		_.colors.addAll(this.colors);
	}
	@Override
	public Series create() {
		MultiPieSeries _=new MultiPieSeries();
		this.assignTo(_);
		return _;
	}
	public String getCategory() {
		return category;
	}
	public String getItem() {
		return item;
	}
	public String getValue() {
		return value;
	}
	public boolean isIgnoreEmptyCategory() {
		return ignoreEmptyCategory;
	}
	public boolean isIgnoreEmptyItem() {
		return ignoreEmptyItem;
	}
	public boolean isIgnoreEmptyValue() {
		return ignoreEmptyValue;
	}
	public boolean isOutline() {
		return outline;
	}
	public boolean isAntialias() {
		return antialias;
	}
	public boolean isCircular() {
		return circular;
	}
	public String getExplode() {
		return explode;
	}
	public boolean isLegend() {
		return legend;
	}
	public int getLegendPosition() {
		return legendPosition;
	}
	public String getLabel() {
		return label;
	}
	public List<String> getColors() {
		return colors;
	}
	public boolean isRing() {
		return ring;
	}
	public double getDepth() {
		return depth;
	}
	public int getColCount() {
		return colCount;
	}
}
